package com.duduli.li;

import java.sql.Time;
import java.text.ParseException;
import java.util.Date;

import org.junit.jupiter.api.Test;

class TimeUtilTest {
	@Test
	void test1() {
		System.out.println(TimeUtil.getWeekStartDate(-2));
	}

	@Test
	void test2() {
		System.out.println(TimeUtil.getWeekEndDate(-2));
	}
	@Test
	void test3() {
		System.out.println(TimeUtil.getWeekNumber(new Date()));
	}
	@Test
	void test4() {
		System.out.println(TimeUtil.getWeekNumber(new Date()));
	}
	@Test
	void test5() {
		System.out.println(TimeUtil.getMonthNumber(new Date()));
	}
	@Test
	void test6() throws ParseException {
		System.out.println(TimeUtil.getSameDateLastYear(TimeUtil.stringToDate(TimeUtil.getWeekStartDate(0))));
	}
	@Test
	void test7() {
		System.out.println(TimeUtil.getMonthStartDate(-1));
	}
	@Test
	void test8() {
		System.out.println(TimeUtil.getMonthEndDate(-1));
	}
	@Test
	void test9() throws ParseException {
		System.out.println(TimeUtil.getSameDateLastYear(TimeUtil.stringToDate(TimeUtil.getMonthEndDate(-1))));
	}
	@Test
	void test10() throws ParseException {
		System.out.println(TimeUtil.getWeekNumber(TimeUtil.stringToDate("2017-12-26 23:59:59")));
	}
	
	@Test
	void test11() {
		System.out.println(TimeUtil.getWeekEndDate(-2));
	}
}
